import java.util.Arrays;

public class Solution1828 {
    public int[] countPoints(int[][] points, int[][] queries) {
        int[] ans=new int[queries.length];
        for (int i=0;i<queries.length;i++){
            for (int[] point : points) {
                if (dis(point,queries[i])<=queries[i][2]){
                    ans[i]++;
                }
            }
        }
        return ans;
    }

    private double dis(int[] point, int[] query) {
        return Math.sqrt((point[0]-query[0])*(point[0]-query[0])+(point[1]-query[1])*(point[1]-query[1]));
    }

    public static void main(String[] args) {
        System.out.println(Arrays.toString(new Solution1828().countPoints(new int[][]{{1, 3}, {3, 3}, {5, 3}, {2, 2}}, new int[][]{{2, 3, 1}, {4, 3, 1}, {1, 1, 2}})));
    }
}
